#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@File   : StorageApi.py
@Time : 2024/12/9 14:04
@Author: Wangwc
@Describe:  ……
"""
from utils.requests_tools import HttpRequest
from utils.requests_tools import check_response


class StorageApi:

    def __init__(self, u_token):
        self.http = HttpRequest(u_token)

    @check_response(check = {"msg": "success"},ext="$..enable")
    def get_storage(self):
        path = '/ugreen/v1/storage/pool/setting/get'
        response = self.http.get(path)
        return response


if __name__ == "__main__":
    a = StorageApi('6A8C010B02444272B40601816BE6AF53')
    b = a.get_storage()
    print(f"提取的值为：{b}")
